<script setup lang="ts">
import {onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onMounted, onUnmounted, onUpdated} from "vue";
onBeforeMount(() => {
  console.log('组件挂载之前')
})
onMounted(() => {
  console.log('组件挂载完毕')
})
onBeforeUpdate(() => {
  console.log('组件更新之前')
})
onUpdated(() => {
  console.log('组件更新完毕')
})
onBeforeUnmount(() => {
  console.log('组件挂载之前')
})
onUnmounted(() => {
  console.log('组件挂载完毕')
})
onActivated(() => {
  console.log('组件激活')
})
onDeactivated(() => {
  console.log('组件失活')
})
</script>

<template>

</template>
